package com.lvcoding.spring5aop.annotation;

import com.lvcoding.spring5aop.domain.MyUser;
import com.lvcoding.spring5aop.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @author wuyanshen
 * @discription 描述
 * @date 2021-03-09 上午11:32
 */
public class TestAnnotationAop {

    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(MyConfig.class);
        UserService userService = (UserService) context.getBean("userServiceImpl");
        userService.login("小红", "1234");
        userService.register(new MyUser());
    }
}
